fix(auth): serialize status imports with logout - #759
Conversation
|
@codex security review Please review head |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Validation for
The first Node CI attempt failed in the unchanged Codex code review completed on this head with no major issues. This PR remains a draft, and #738 remains open and unchanged. |
b05c3b9 to
9ceac8f
Compare
|
@codex review Please review head |
|
@codex security review Please review head |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Validation for head
#738 is merged. This PR is rebased onto |
|
@codex review Please review head |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Please review head All nine patch-browser tests passed with coverage enabled, including 104 assertions. SDK typecheck, changed-file formatting, and git diff checks passed. The full suite is left to CI. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
A status check can import ambient Codex credentials after a concurrent logout has removed them. Use the existing credential-home lock to serialize status imports and logout so a completed logout cannot be undone by that import.
This follows #738, which is now merged, and also isolates its authentication fixtures and documents credential-import errors. The branch is based on
main.Changes
Testing
CI repair at
f025376ce7e3f325df37c68094b0ee2a4d2a9717againstmainat3c44b607dc05639a0e307a50d6dad1f822aeac00:Earlier validation recorded for prior heads:
Merge resolution at
a6a645eb1ea7daee4da60dc96c1972b96ce3f09cagainstmainat3c44b607dc05639a0e307a50d6dad1f822aeac00:chmodandrelativeimports inapi-credentials.test.ts, preserving the tests from both branches.12345: 43 passed, zero failures acrossapi-credentials.test.ts,cli-authentication.test.ts, andauth-status-concurrency.test.ts, including all four concurrency cases.git diff --checkpassed.Earlier validation of
9ceac8fdb4f54aa422e08124cc54b62f04e180c4, before this merge:3312411185: 2,120 passed, 43 skipped, zero failures.pnpm run types,pnpm run format, plugin bundle build, andgit diff --checkpassed.pscall. Thepsfailure also reproduces on unchangedmain; both cases passed on an isolated rerun with native process access.Risk and rollout
Status imports and logout now wait for other operations holding the same credential-home lock, including scans. No public CLI flags, environment variables, defaults, or dependencies change. API-key precedence and the existing credential-home and logout-marker behavior are preserved.
Unreadable-file tests are skipped on Windows and when running as root, where the POSIX permission fixture cannot reliably deny access. Shared authentication and concurrency tests remain enabled across platforms.
Public disclosure review